//
//  GLView.h
//  V3d_Cocoa
//
//  Created by Y my on 11-3-10.
//  Copyright 2011 NJUST. All rights reserved.
//

#import "Observer.h"
#import "MIPRenderer.h"

@interface GLView : UIView <Observer> {
	Renderer* renderer;
	CGImageRef pixmap;
	
	float distanceToAngle;
}

- (void)setRendererData:(id <VolDataDelegate>)volData;
- (void)setRendererViewWidth:(unsigned short)width
					  Height:(unsigned short)height
					BkgColor:(RGB)color;

- (void)reset;

// 下面两个函数中，X, Y：鼠标（手指）前进的方向，Distance：鼠标（手指）前进的距离
- (void)rotateByGestureVX:(float)vx VY:(float)vy Distance:(float)dis;
- (void)translateByGestureVX:(float)vx VY:(float)vy Distance:(float)dis;

// （X, Y）: 旋转轴上一点（另一点始终为原点，旋转轴始终位于xoy平面中），Angle：旋转角度（弧度，逆时针）
- (void)rotateX:(float)x Y:(float)y Angle:(float)angle;

// （X, Y）：平移向量
- (void)translateX:(float)x Y:(float)y;

- (void)afterRotationWithInterfaceOrientation:(UIInterfaceOrientation)orientation;
@end